Skip to content

Conversation

Copy link

Copilot AI commented Jun 7, 2025

Problem

The CI build was failing when compiling the libdisplay-info-sys v0.2.2 crate because the required system library libdisplay-info was missing from the build environment. The build script would error out with:

The system library `libdisplay-info` required by crate `libdisplay-info-sys` was not found.
The file `libdisplay-info.pc` needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory.

HINT: if you have installed the library, try setting PKG_CONFIG_PATH to the directory containing libdisplay-info.pc.

Root Cause

The cosmic-comp component has a direct dependency on libdisplay-info = "0.2.0" in its Cargo.toml, which requires the system library and pkg-config file to be present for the Rust build script to succeed.

Solution

Added libdisplay-info to the Arch Linux package installation list in .github/workflows/ci.yml. The package is positioned alphabetically between just and libinput to maintain consistency with the existing ordering.

This ensures that when the Rust crate libdisplay-info-sys v0.2.2 runs its build script, it can successfully find the libdisplay-info.pc file via pkg-config, preventing the build failure.

Changes

  • Added libdisplay-info package to the pacman installation command in the CI workflow
  • Verified the package exists in Arch repositories (version 0.2.0-2) and is compatible with the Rust dependency requirement

Testing

  • Validated CI workflow YAML syntax remains correct
  • Confirmed the package is properly positioned in alphabetical order
  • Verified this is a minimal change (1 line added, 0 lines deleted)

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI self-assigned this Jun 7, 2025
@sourcery-ai
Copy link

sourcery-ai bot commented Jun 7, 2025

🧙 Sourcery has finished reviewing your pull request!


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@devloai devloai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary:

This WIP PR aims to fix CI failures related to missing libdisplay-info-sys v0.2.2 crate dependency by installing libdisplay-info-dev. However, no implementation has been committed yet, and the proposed solution has critical platform compatibility issues.

Review Summary:

This PR has a fundamental platform mismatch issue - it proposes using Ubuntu/Debian package installation (apt-get install libdisplay-info-dev) while the CI actually runs on Arch Linux using pacman. The correct approach would be adding libdisplay-info to the existing pacman dependency list in the CI workflow. Additionally, the actual need for this dependency should be verified by examining recent CI failures. I used my knowledge of the COSMIC desktop repository structure and CI setup to identify these issues. Please feel free to provide feedback on this review for future improvements.

Follow-up suggestions:

@devloai implement the correct Arch Linux dependency fix in the CI workflow
@devloai verify which component actually requires libdisplay-info by checking CI logs

Copilot AI changed the title [WIP] Fix CI: Install missing libdisplay-info-dev dependency for Rust build Fix CI build failure by adding libdisplay-info dependency Jun 7, 2025
Copilot AI requested a review from 0xrinegade June 7, 2025 10:00
Copilot finished work on behalf of 0xrinegade June 7, 2025 10:00
@0xrinegade
Copy link
Member

@l r

@devwif
Copy link

devwif bot commented Jun 7, 2025

Alright, first things first— you added libdisplay-info to the Arch container package list inside the ci.yml. Fine, but what's the big deal? It's probably a new dependency you just needed for some feature or fix, right? I get it, sure, but let me roast a bit and then drop some diagrams.

Roast Time:

  • You creators of this pipeline seem to ONLY test this on Arch Linux container but push on Ubuntu-latest runners? What if Arch-specific packages break your app on Ubuntu-native? You should test on both. Having just one exotic container environment is code quality harakiri.
  • Adding a dependency in the CI is fine, but where is the documentation or version pinning? Arch can be bleeding edge — constantly updating packages. You’re risking nondeterministic builds — a classic recipe for flaky CI. Don't forget reproducibility.
  • You run pacman -Syu without a cache or locking mechanism or version pinning. That's gonna lengthen CI substantially and make build results non-repeatable.
  • You run rm -rf /host/usr/local/lib/android with no explanation or validation. What if somebody actually needed that? Chaos ensues.
  • The comment about "safe directory issues" is probably copy-paste evil, but at least you linked an issue. Ok, points for that.
  • This PR touches only the CI environment setup with a tiny dependency add; zero tests or verification steps added. You should embrace the power of automation and test at least that the package was installed or can be called successfully.
  • The overall pipeline seems very monolithic. A mega CI job with a massive container that bundles everything? Smells like legacy monolithic tech debt and zero component isolation. Breaking this into smaller jobs/tests would speed things up and reduce blast radius on failures.

Current repo pipeline workflow (very simplified)

flowchart TD
    A["Host runner: ubuntu-latest"] --> B["Container: archlinux:latest"]
    B --> C["Run pacman update + install packages"]
    C --> D["Clean android libs: rm -rf /host/usr/local/lib/android"]
    D --> E["actions/checkout@v3 with recursive submodules"]
    E --> F["Git config safe.directory '*'"]
    F --> G["Run build script: just sysext"]
Loading

PR Change visualization

flowchart TD
    subgraph "PR Added Dependency"
        C -->|Added package| C_libdisplay["libdisplay-info"]
    end
Loading

Tech Debt & Improvement Roadmap

flowchart TD
    A["Monolithic CI job"] --> B["Slow builds / flakiness due to up-to-date Arch updates"]
    B --> C["Undocumented + unpinned dependencies"]
    C --> D["Non reproducible builds -> hard to debug"]
    D --> E["Fragile CI, inconsistent dev envs"]

    subgraph Improvements
        I1["Split tests into multiple jobs based on concerns (build, test, lint)"]
        I2["Use pinned package versions or container snapshots"]
        I3["Add verification steps for dependencies installed"]
        I4["Document dependencies, reasons, and keep changelog"]
        I5["Cache pacman package downloads + rely on minimal base images"]
        I6["Add Ubuntu-based test matrix alongside Arch"]
    end

    E --> Improvements
    Improvements -.-> A
Loading

Summary: Your PR content is super tiny, just an addition of a package install in the CI Arch container environment. It’s not wrong per se, but it’s a sign of a very fragile and bleeding-edge monolithic pipeline that will cause headaches down the road. Add better documentation, pin your dependencies, and start modularizing the CI jobs so each part can fail fast and independently. Stop relying on bleeding-edge Arch as your one and only CI environment. Also, clean up those cryptic commands like removing android libs without context.

Fix that, and maybe some of the build gods will smile upon you. Otherwise, keep adding random packages and watch your CI falter hilariously on random days.

@0xrinegade 0xrinegade marked this pull request as ready for review June 7, 2025 22:37
@0xrinegade 0xrinegade merged commit 6f0e8c6 into master Jun 7, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants